import VueRouter from "vue-router";

// 引入路由组件
import Login from "@/pages/Login";
import List from "@/pages/List";
import Detail from "@/pages/Detail";
import Detail0 from "@/pages/Detail/Detail0";
import Detail4 from "@/pages/Detail4";
import Detail3 from "@/pages/Detail3";
import Detail2 from "@/pages/Detail2";
import Detail1 from "@/pages/Detail1";

export default new VueRouter({
    routes:[
        {
            name:'Login',
            path:'/login',
            component:Login
        },
        {
            name:'List',
            path:'/list',
            component:List
        },
        {
            name:'Detail',
            path:'/detail',
            component:Detail,
            // children:[
            //     {
            //         path:'0',
            //         component: Detail0
            //     },
            //     {
            //         path:'1',
            //         component: Detail1
            //     },
            //     {
            //         path:'2',
            //         component: Detail2
            //     },
            //     {
            //         path:'3',
            //         component: Detail3
            //     },
            //     {
            //         path:'4',
            //         component: Detail4
            //     },
            // ]
        },
        {
            name:'Detail1',
            path:'/detail1',
            component:Detail1
        },
        {
            name:'Detail2',
            path:'/detail2',
            component:Detail2
        },
        {
            name:'Detail3',
            path:'/detail3',
            component:Detail3
        },
        {
            name:'Detail4',
            path:'/detail4',
            component:Detail4
        },

        // 重定向首页
        {
            path:'*',
            redirect:'/login'
        }

    ]
})
